#coding:utf-8
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
import time 
device = MonkeyRunner.waitForConnection() 
n = 1
while n < 100:
    device.touch(240, 770, device.DOWN_AND_UP)  #menu
    time.sleep(1)
    device.touch(355, 450, device.DOWN_AND_UP)  #工具
    time.sleep(1)
    device.touch(65, 645, device.DOWN_AND_UP)  #快捷翻译
    time.sleep(1)
#    device.touch(130, 570, device.DOWN_AND_UP)  #翻译
#    time.sleep(1)
    device.touch(350, 570, device.DOWN_AND_UP)  #取消
    time.sleep(1)
    #点击物理返回键
#    device.press('KEYCODE_BACK', device.DOWN_AND_UP)    #back
#    time.sleep(1)
    
    print "Time %s"%n
    n = n + 1
print "Done!"
